<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html">
<f:view contentType="text/html" />

<h:head>
	<title>Create Student!</title>
</h:head>
<h:body bgcolor="white">
	<h:form id="createStudentForm">
		<h:panelGrid id="studentTable" columns="2">
			<h:outputLabel for="loginName">
				<h:outputText id="loginNameLabel" value="Login Name:" />
			</h:outputLabel>

			<h:inputText id="loginName" value="#{studentController.loginName}" required="true" />
			<h:outputLabel for="password">
				<h:outputText id="passwordLabel" value="Password:" />
			</h:outputLabel>

			<h:inputSecret id="password" value="#{studentController.password}" required="true" />
			
			<h:outputLabel for="firstName">
				<h:outputText id="firstNameLabel" value="#{msg.firstName}" />
				
			</h:outputLabel>

			<h:inputText id="firstName" value="#{studentController.firstName}" required="true"  requiredMessage="First Name is Required"/>

			<h:outputLabel for="lastName">
				<h:outputText id="lastNameLabel" value="Last Name:" />
			</h:outputLabel>

			<h:inputText id="lastName" value="#{studentController.lastName}" required="true" />

			<h:outputLabel for="middleName">
				<h:outputText id="middleNameLabel" value="Middle Name:" />
			</h:outputLabel>

			<h:inputText id="middleName" value="#{studentController.middleName}" />

			<h:outputLabel for="registrationDate">
				<h:outputText id="registrationDateLabel" value="Registration Date:" />
			</h:outputLabel>

			<h:inputText id="registrationDate"
				value="#{studentController.registrationDate}" required="true" >
				<f:convertDateTime for="registrationDate" pattern="yyyy.MM.dd" />
			</h:inputText>

			<h:commandButton id="submit"
				action="#{studentController.createStudent}" value="Create Student" />
		</h:panelGrid>
	</h:form>
</h:body>
</html>
